﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MasterEntities.Abstraction;
using DataAccessLayer.DatabaseOperations;
using MasterEntities;
using System.Linq.Expressions;

namespace DataAccessLayer
{
    public interface IGenericDataAccessLayer<T> where T : class
    {
        bool Create(IDomainObject objectToCreate, AbstractExecutionTemplate template);

        bool Update(IDomainObject objectToUpdate, AbstractExecutionTemplate template);

        bool Delete(IDomainObject objectToDelete, AbstractExecutionTemplate template);

        List<T> GetAll(params Expression<Func<T, object>>[] navigationProperties);

        List<T> GetList(Func<T, bool> where, params Expression<Func<T, object>>[] navigationProperties);

        T GetEntity(Func<T, bool> where, params Expression<Func<T, object>>[] navigationProperties);
    }
}
